package com.hzqy.persistence.dao.hotel;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.HotelUserNeedsVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class HotelUserNeedsDao extends PersistenceDao<HotelUserNeedsVo, Integer>{
	protected final Logger LOG = LoggerFactory.getLogger(getClass());
	
	public int selectHotelUserNeedsCount(HotelUserNeedsVo hotelUserNeedsVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectHotelUserNeedsCount", hotelUserNeedsVo);
	}
	
	public List<HotelUserNeedsVo> selectHotelUserNeedsList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectHotelUserNeedsList", map);
	}
	public HotelUserNeedsVo selectHotelUserNeedsVo(String f_hsn_id){
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectHotelUserNeedsVo", f_hsn_id);
	}

	public int deleteHotelUserNeedsVo(String f_hsn_id) {
		String namespace = this.getNamespace();
		return getSqlSession().update(namespace + "deleteHotelUserNeedsVo", f_hsn_id);
	}
	
	public int insertHotelUserNeedsVo(HotelUserNeedsVo hotelUserNeedsVo) {
		return getSqlSession().insert(this.getNamespace() + "insertHotelUserNeedsVo", hotelUserNeedsVo);
	}
	
	public int updateHotelUserNeedsVo(HotelUserNeedsVo hotelUserNeedsVo) {
		return getSqlSession().update(this.getNamespace() + "updateHotelUserNeedsVo", hotelUserNeedsVo);
	}

	public int updateHotelUserNeedsVoStatus(Map<String,Object> map) {
		return getSqlSession().update(this.getNamespace() + "updateHotelUserNeedsVoStatus", map);
	}

	public int updateHotelUserNeedsVoEvaluate(Map<String,Object> map) {
		return getSqlSession().update(this.getNamespace() + "updateHotelUserNeedsVoEvaluate", map);
	}
}
